:root {
    --bg: #F6F4F2;
    --text: #2F2F2F;
    --muted: #6b6b6b;
    --accent: #2A7A73;
    --card: #ffffff;
    --radius: 12px;
    --gap: 16px;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px
}

.site-header {
    background: var(--card);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06)
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px
}

.brand h1 {
    margin: 0;
    font-size: 18px
}

.tagline {
    margin: 0;
    font-size: 12px;
    color: var(--muted)
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center
}

/* Buttons */
.btn {
    border: 0;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600
}

.btn-primary {
    background: var(--accent);
    color: #fff
}

.btn-success {
    background: #3b8b43;
    color: #fff
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(0, 0, 0, 0.06)
}

.btn:focus {
    outline: 3px solid rgba(42, 122, 115, 0.15)
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 24px;
    align-items: center;
    margin: 28px 0
}

.hero h2 {
    font-size: 28px;
    margin: 0
}

.hero p {
    color: var(--muted)
}

.hero-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06)
}

/* Sections */
.section {
    background: var(--card);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04)
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
}

/* Product card */
.product-card {
    background: linear-gradient(180deg, #fff, var(--card));
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04)
}

.product-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px
}

.product-card h4 {
    margin: 0;
    font-size: 16px
}

.product-card .price {
    font-weight: 700
}

.product-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: auto
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px
}

.modal[aria-hidden="true"] {
    display: none
}

.modal-content {
    background: var(--card);
    width: 100%;
    max-width: 720px;
    border-radius: 12px;
    padding: 18px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3)
}

.modal-close {
    position: absolute;
    right: 12px;
    top: 8px;
    border: 0;
    background: transparent;
    font-size: 22px;
    cursor: pointer
}

/* Forms */
.form label {
    display: block;
    margin-bottom: 10px
}

.form input[type="text"],
.form input[type="email"],
.form textarea,
.form input[type="file"] {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 12px
}

/* Editor layout */
.editor-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 18px
}

.editor-aside {
    background: var(--bg);
    padding: 12px;
    border-radius: 10px
}

.editor-main label {
    display: block;
    margin-bottom: 12px
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 8px
}

.media-grid img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 8px
}

.token {
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    overflow-x: auto
}

/* Memorial public */
.memorial-card {
    padding: 16px;
    background: linear-gradient(180deg, var(--card), #fff);
    border-radius: 12px
}

.meta {
    color: var(--muted);
    margin-bottom: 12px
}

/* Utilities */
.hidden {
    display: none
}

.muted {
    color: var(--muted);
    font-size: 13px
}

.back-link {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--accent);
    text-decoration: none
}

/* Footer */
.site-footer {
    margin-top: 28px;
    padding: 18px 0;
    text-align: center;
    color: var(--muted)
}

/* Responsive */
@media (max-width:900px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 16px
    }

    .editor-grid {
        grid-template-columns: 1fr
    }

    .header-inner {
        flex-direction: column;
        gap: 8px
    }
}